package com.yoda.quartzdemo.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yoda.quartzdemo.dao.JobAndTriggerDao;
import com.yoda.quartzdemo.entity.JobAndTrigger;
import com.yoda.quartzdemo.service.JobService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class JobServiceImpl  implements JobService {
    @Resource
    private JobAndTriggerDao jobAndTriggerDao;
    @Override
    public PageInfo<JobAndTrigger> getJobAndTriggerDetails(int pageNum, int pageSize) {
        System.out.println("--------------------"+jobAndTriggerDao);
//        PageHelper.startPage(pageNum-1, pageSize);
        List<JobAndTrigger> jobAndTriggerList = jobAndTriggerDao.getAccountLogByCondition();
        return new PageInfo<>(jobAndTriggerList);
    }
}
